#ifndef QTDMXSLIDERPANEL_H
#define QTDMXSLIDERPANEL_H

#include "IF_DmxSliderPanel.h"
#include <QWidget>
#include <QList>

class QSlider;
class IF_LightTransitionEngine;

class QtDmxSliderPanel : public IF_DmxSliderPanel
{
   Q_OBJECT
public:
   explicit QtDmxSliderPanel( int numOfChannels, IF_LightTransitionEngine *transitionEngine,
                              QWidget *parent);

   /** redefinition of ::IF_DmxSliderPanel::setAllValues */
   virtual void setAllValues( const QList<double> &values);

   /** redefinition of ::IF_DmxSliderPanel::setValueAtChannel */
   virtual void setValueAtChannel( double value, int channel);

   /** redefinition of ::IF_DmxSliderPanel::setDmxOn */
   virtual void setDmxOn();

   /** redefinition of ::IF_DmxSliderPanel::setDmxOff */
   virtual void setDmxOff();

private:
   QList<QSlider *> m_sliderSet;

   /** @brief  set to TRUE during update from core notification.
    * when the core updates the value of a channel, the GUI must not
    * notify such change back to avoid a loop.
    */
   bool m_updateInProgress;

private slots:
   void onSliderValueChanged(int value);
};

#endif // QTDMXSLIDERPANEL_H
